<ul class="news-box">
	<? foreach($news as $k=>$n): ?>
	<?php
		$rgxp = '/<img.*?>/i';
		$img = false;
		$link = '/novosti/vest/' . $n['News']['id'] . "/" . $n['News']['slug'];
		if (preg_match($rgxp, $n['News']['content'], $tmp)) {
			preg_match_all('/src="(.*?)"/', $tmp[0], $src);
			$img = $this->Html->image($src[1][0], array(
				'width' => '240',
				'url' => $link
			));
		}
	?>
	
	<li<? if(($k+1)%3==0): ?> style="margin-right:0"<? endif; ?>>
		<h2><?= $this->Html->link($n['News']['title'], $link) ?></h2>
		<p class="date"><?= $n['News']['date_formated'] ?></p>
		<? if($img): ?>
		<p class="image"><?= $img ?></p>
		<? else: ?>
		  <p class="blurb"><?= $this->Html->link($n['News']['blurb'], $link) ?></p>
		<? endif ?>
	</li>
	<? endforeach; ?>
</ul><br clear="all">